﻿namespace Numbrella.TaskSamples.PrimeNumbers
{
	using System;
	
	[Serializable]
	public class ResultContents
	{
		public ResultContents(long primeNumberCount)
		{
			this.PrimeNumberCount = primeNumberCount;
		}

		public long PrimeNumberCount { get; private set; }

		public override bool Equals(object obj)
		{
			if (obj == null || GetType() != obj.GetType())
			{
				return false;
			}

			return this.PrimeNumberCount == ((ResultContents) obj).PrimeNumberCount;
		}

		public override int GetHashCode()
		{
			return this.PrimeNumberCount.GetHashCode();
		}
	}
}
